import Vue from 'vue'
import i18n from '@/lang/index.js'
// 此初始化oss是为了搭配Avue文件上传的oss初始化
const mixin = {
  data () {
    return {

    }
  },
  created () {
    const stsToken = this.$store.getters.userInfo.stsToken
    Vue.use(window.AVUE, {
      size: 'small',
      tableSize: 'small',
      calcHeight: 65,
      i18n: (key, value) => i18n.t(key, value),
      ali: {
        region: stsToken.region,
        accessKeyId: stsToken?.accessKeyId,
        accessKeySecret: stsToken?.accessKeySecret,
        stsToken: stsToken?.securityToken,
        bucket: stsToken?.bucket,
        endpoint: stsToken.endpoint,
      }
    })
  },
  methods: {

  }
}
export default mixin